package com.example.ilewis.hello;

import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.TextView;



public class HelloMain extends Activity {
/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  	super.onCreate(savedInstanceState);
  	setContentView(R.layout.main);
  	foo();
  	
  	Button b1 = (Button)findViewById(R.id.button1);
  	b1.setOnClickListener(ButtonListener_);
  }
    		
  public native String foo(); 

  public void SetText(String text) {
  	TextView tv = (TextView)findViewById(R.id.my_text);
  	tv.setText(text);
  }
  
  private OnClickListener ButtonListener_ = new OnClickListener() {
    public void onClick(View v) {
      SetText("howdy");
      foo();
    }
  };

  static {
    System.loadLibrary("hello");
  }
}